home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / c / getc.man < prev    next >
Encoding:
Text File  |  1989-03-07  |  2.0 KB  |  67 lines

  1.  
  2.  
  3.  
  4. GETC                  C Library Procedures                   GETC
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      getc, getchar, fgetc, getw - get character or word from
  10.      stream
  11.  
  12. SSYYNNOOPPSSIISS
  13.      ##iinncclluuddee <<ssttddiioo..hh>>
  14.  
  15.      iinntt ggeettcc((ssttrreeaamm))
  16.      FFIILLEE **ssttrreeaamm;;
  17.  
  18.      iinntt ggeettcchhaarr(())
  19.  
  20.      iinntt ffggeettcc((ssttrreeaamm))
  21.      FFIILLEE **ssttrreeaamm;;
  22.  
  23.      iinntt ggeettww((ssttrreeaamm))
  24.      FFIILLEE **ssttrreeaamm;;
  25.  
  26. DDEESSCCRRIIPPTTIIOONN
  27.      _G_e_t_c returns the next character from the named input _s_t_r_e_a_m.
  28.  
  29.      _G_e_t_c_h_a_r() is identical to _g_e_t_c(_s_t_d_i_n).
  30.  
  31.      _F_g_e_t_c behaves like _g_e_t_c, but is a genuine function, not a
  32.      macro; it may be used to save object text.
  33.  
  34.      _G_e_t_w returns the next iinntt (a 32-bit integer on a VAX-11)
  35.      from the named input _s_t_r_e_a_m.  It returns the constant EEOOFF
  36.      upon end of file or error, but since that is a good integer
  37.      value, _f_e_o_f and _f_e_r_r_o_r(3S) should be used to check the suc-
  38.      cess of _g_e_t_w.  _G_e_t_w assumes no special alignment in the
  39.      file.
  40.  
  41. SSEEEE AALLSSOO
  42.      clearerr(3S), fopen(3S), putc(3S), gets(3S), scanf(3S),
  43.      fread(3S), ungetc(3S)
  44.  
  45. DDIIAAGGNNOOSSTTIICCSS
  46.      These functions return the integer constant EEOOFF at end of
  47.      file, upon read error, or if an attempt is made to read a
  48.      file not opened by _f_o_p_e_n.  The end-of-file condition is
  49.      remembered, even on a terminal, and all subsequent attempts
  50.      to read will return EEOOFF until the condition is cleared with
  51.      _c_l_e_a_r_e_r_r(3S).
  52.  
  53. BBUUGGSS
  54.      Because it is implemented as a macro, _g_e_t_c treats a _s_t_r_e_a_m
  55.      argument with side effects incorrectly.  In particular,
  56.      `getc(*f++);' doesn't work sensibly.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Sprite v1.0               May 14, 1986                          1
  64.  
  65.  
  66.  
  67.